package com.starinside.wp.domain;

import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * @Describle This Class Is
 * @Author ZengMin
 * @Date 2018/11/9 14:07
 * @Company Matt
 */
@Data
@Table(name = "praises")
@Entity
@EqualsAndHashCode(callSuper = true)
public class Praises extends Model {

    @Column(columnDefinition = "varchar(32) COMMENT '用户id'")
    private String uid;

    @Column(columnDefinition = "varchar(32) COMMENT '动态id'")
    private String fid;

    @Column(columnDefinition = "datetime COMMENT '用户id'")
    private Date created = new Date();

    public static Praises of(String uid,String fid){
        Praises praises = new Praises();
        praises.setUid(uid);
        praises.setFid(fid);
        return praises;
    }
}
